#include <iostream>
#include <random>
#include <ctime>
using namespace std;

int Max1(int a, int b);
int Max1(int a, int b, int c);
double Max1(double a, double b);
double Max1(double a, double b, double c);

int main() {
	default_random_engine e(time(0));
	uniform_int_distribution<int> u_int(-100, 100);
	int ints[5];
	for (int i = 0; i < 5; i++) {
		ints[i] = u_int(e);
	}
	cout << "The biggest of " << ints[0] << ", " << ints[1] << " is " << Max1(ints[0], ints[1]) << endl;
	cout << "The biggest of " << ints[2] << ", " << ints[3] << ", " << ints[4] << " is " << Max1(ints[2], ints[3], ints[4]) << endl;
	uniform_real_distribution<double> u_double(-100.0, 100.0);
	double doubles[5];
	for (int i = 0; i < 5; i++) {
		doubles[i] = u_double(e);
	}
	cout << "The biggest of " << doubles[0] << ", " << doubles[1] << " is " << Max1(doubles[0], doubles[1]) << endl;
	cout << "The biggest of " << doubles[2] << ", " << doubles[3] << ", " << doubles[4] << " is " << Max1(doubles[2], doubles[3], doubles[4]) << endl;
}

int Max1(int a, int b) {
	return a > b ? a : b;
}

int Max1(int a, int b, int c) {
	b = Max1(b, c);
	return a > b ? a : b;
}

double Max1(double a, double b) {
	return a > b ? a : b;
}

double Max1(double a, double b, double c) {
	b = Max1(b, c);
	return a > b ? a : b;
}